Integrand size = 31, antiderivative size = 133 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {(3 c-2 d) d^2 \text {arctanh}(\sin (e+f x))}{a^2 f}+\frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac {\left (c^3+4 c^2 d-12 c d^2+10 d^3-(c-4 d) d^2 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.45, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {4072, 100, 148, 65, 223, 209} \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {\tan (e+f x) \left (c^3+4 c^2 d-d^2 (c-4 d) \sec (e+f x)-12 c d^2+10 d^3\right )}{3 f \left (a^2 \sec (e+f x)+a^2\right )}+\frac {2 d^2 (3 c-2 d) \tan (e+f x) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a (\sec (e+f x)+1)}}\right )}{a f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}+\frac {(c-d) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f (a \sec (e+f x)+a)^2} \]
[In]
[Out]
Rule 65
Rule 100
Rule 148
Rule 209
Rule 223
Rule 4072
Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {(c+d x)^3}{\sqrt {a-a x} (a+a x)^{5/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac {\tan (e+f x) \text {Subst}\left (\int \frac {(c+d x) \left (-a^2 \left (c^2+4 c d-2 d^2\right )+a^2 (c-4 d) d x\right )}{\sqrt {a-a x} (a+a x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{3 a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac {\left (c^3+4 c^2 d-12 c d^2+10 d^3-(c-4 d) d^2 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )}-\frac {\left ((3 c-2 d) d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac {\left (c^3+4 c^2 d-12 c d^2+10 d^3-(c-4 d) d^2 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )}+\frac {\left (2 (3 c-2 d) d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{\sqrt {2 a-x^2}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac {\left (c^3+4 c^2 d-12 c d^2+10 d^3-(c-4 d) d^2 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )}+\frac {\left (2 (3 c-2 d) d^2 \tan (e+f x)\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right )}{a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}} \\ & = \frac {2 (3 c-2 d) d^2 \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right ) \tan (e+f x)}{a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}+\frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac {\left (c^3+4 c^2 d-12 c d^2+10 d^3-(c-4 d) d^2 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^2+a^2 \sec (e+f x)\right )} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(294\) vs. \(2(133)=266\).
Time = 3.65 (sec) , antiderivative size = 294, normalized size of antiderivative = 2.21 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {2 \cos ^6\left (\frac {1}{2} (e+f x)\right ) \sec (e+f x) \left (6 d^2 (-3 c+2 d) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )-8 (c-d)^3 \csc ^3(e+f x) \sin ^4\left (\frac {1}{2} (e+f x)\right )+32 (c-d)^3 \csc ^5(e+f x) \sin ^8\left (\frac {1}{2} (e+f x)\right )+2 \left (2 c^3+3 c^2 d-12 c d^2+13 d^3\right ) \tan \left (\frac {1}{2} (e+f x)\right )+6 (3 c-2 d) d^2 \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )\right ) \tan ^2\left (\frac {1}{2} (e+f x)\right )-2 (c-d)^2 (2 c+7 d) \tan ^3\left (\frac {1}{2} (e+f x)\right )\right )}{3 a^2 f (1+\cos (e+f x))^2} \]
[In]
[Out]
Time = 0.84 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.32
method | result | size |
parallelrisch | \(\frac {-18 \left (c -\frac {2 d}{3}\right ) \cos \left (f x +e \right ) d^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+18 \left (c -\frac {2 d}{3}\right ) \cos \left (f x +e \right ) d^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) \sec \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \left (\left (c^{3}+\frac {3}{2} c^{2} d -6 c \,d^{2}+5 d^{3}\right ) \cos \left (2 f x +2 e \right )+\left (c^{3}+6 c^{2} d -15 c \,d^{2}+14 d^{3}\right ) \cos \left (f x +e \right )+c^{3}+\frac {3 c^{2} d}{2}-6 c \,d^{2}+8 d^{3}\right )}{6 f \,a^{2} \cos \left (f x +e \right )}\) | \(175\) |
derivativedivides | \(\frac {-\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{3}}{3}+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{2} d -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c \,d^{2}+\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{3}}{3}+c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-9 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2}+5 d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {2 d^{3}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}+2 d^{2} \left (3 c -2 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )-\frac {2 d^{3}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}-2 d^{2} \left (3 c -2 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2 f \,a^{2}}\) | \(216\) |
default | \(\frac {-\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{3}}{3}+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{2} d -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c \,d^{2}+\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{3}}{3}+c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-9 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2}+5 d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {2 d^{3}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}+2 d^{2} \left (3 c -2 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )-\frac {2 d^{3}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}-2 d^{2} \left (3 c -2 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2 f \,a^{2}}\) | \(216\) |
norman | \(\frac {\frac {\left (c^{3}-3 c \,d^{2}+2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{a f}-\frac {\left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{6 a f}-\frac {\left (c^{3}+3 c^{2} d -9 c \,d^{2}+9 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 a f}-\frac {\left (2 c^{3}+3 c^{2} d -12 c \,d^{2}+9 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{a f}+\frac {\left (5 c^{3}+12 c^{2} d -39 c \,d^{2}+34 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 a f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3} a}+\frac {d^{2} \left (3 c -2 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{a^{2} f}-\frac {d^{2} \left (3 c -2 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{a^{2} f}\) | \(276\) |
risch | \(\frac {2 i \left (3 c^{3} {\mathrm e}^{4 i \left (f x +e \right )}-9 c \,d^{2} {\mathrm e}^{4 i \left (f x +e \right )}+6 d^{3} {\mathrm e}^{4 i \left (f x +e \right )}+3 c^{3} {\mathrm e}^{3 i \left (f x +e \right )}+9 c^{2} d \,{\mathrm e}^{3 i \left (f x +e \right )}-27 c \,d^{2} {\mathrm e}^{3 i \left (f x +e \right )}+18 d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+5 c^{3} {\mathrm e}^{2 i \left (f x +e \right )}+3 c^{2} d \,{\mathrm e}^{2 i \left (f x +e \right )}-21 c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}+22 d^{3} {\mathrm e}^{2 i \left (f x +e \right )}+3 c^{3} {\mathrm e}^{i \left (f x +e \right )}+9 c^{2} d \,{\mathrm e}^{i \left (f x +e \right )}-27 c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}+24 d^{3} {\mathrm e}^{i \left (f x +e \right )}+2 c^{3}+3 c^{2} d -12 c \,d^{2}+10 d^{3}\right )}{3 f \,a^{2} \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right ) \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3}}+\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c}{a^{2} f}-\frac {2 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{a^{2} f}-\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c}{a^{2} f}+\frac {2 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{a^{2} f}\) | \(375\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 268 vs. \(2 (130) = 260\).
Time = 0.28 (sec) , antiderivative size = 268, normalized size of antiderivative = 2.02 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {3 \, {\left ({\left (3 \, c d^{2} - 2 \, d^{3}\right )} \cos \left (f x + e\right )^{3} + 2 \, {\left (3 \, c d^{2} - 2 \, d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (3 \, c d^{2} - 2 \, d^{3}\right )} \cos \left (f x + e\right )\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, {\left ({\left (3 \, c d^{2} - 2 \, d^{3}\right )} \cos \left (f x + e\right )^{3} + 2 \, {\left (3 \, c d^{2} - 2 \, d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (3 \, c d^{2} - 2 \, d^{3}\right )} \cos \left (f x + e\right )\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (3 \, d^{3} + {\left (2 \, c^{3} + 3 \, c^{2} d - 12 \, c d^{2} + 10 \, d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (c^{3} + 6 \, c^{2} d - 15 \, c d^{2} + 14 \, d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{6 \, {\left (a^{2} f \cos \left (f x + e\right )^{3} + 2 \, a^{2} f \cos \left (f x + e\right )^{2} + a^{2} f \cos \left (f x + e\right )\right )}} \]
[In]
[Out]
\[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {\int \frac {c^{3} \sec {\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c^{2} d \sec ^{2}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx}{a^{2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 342 vs. \(2 (130) = 260\).
Time = 0.25 (sec) , antiderivative size = 342, normalized size of antiderivative = 2.57 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {d^{3} {\left (\frac {\frac {15 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{2}} + \frac {12 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{2}} + \frac {12 \, \sin \left (f x + e\right )}{{\left (a^{2} - \frac {a^{2} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 3 \, c d^{2} {\left (\frac {\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{2}} + \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{2}}\right )} + \frac {3 \, c^{2} d {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}} + \frac {c^{3} {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, f} \]
[In]
[Out]
none
Time = 0.36 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.88 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=-\frac {\frac {12 \, d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} a^{2}} - \frac {6 \, {\left (3 \, c d^{2} - 2 \, d^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a^{2}} + \frac {6 \, {\left (3 \, c d^{2} - 2 \, d^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a^{2}} + \frac {a^{4} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 3 \, a^{4} c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 3 \, a^{4} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - a^{4} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 3 \, a^{4} c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 9 \, a^{4} c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 27 \, a^{4} c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 15 \, a^{4} d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{6}}}{6 \, f} \]
[In]
[Out]
Time = 13.52 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.02 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {2\,d^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (3\,c-2\,d\right )}{a^2\,f}-\frac {2\,d^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-a^2\right )}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,{\left (c-d\right )}^3}{6\,a^2\,f}-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {{\left (c-d\right )}^3}{a^2}-\frac {3\,\left (c+d\right )\,{\left (c-d\right )}^2}{2\,a^2}\right )}{f} \]
[In]
[Out]